<?php

defined('_JEXEC') or die('Restricted access');
?>

<form action="<?php echo JRoute::_('index.php');?>" method="post" name="adminForm" id="adminForm">

    <table>

        <tr class="<?php echo "row$k"; ?>">
            <td>Driver:</td>
            <td><input class='input1' name='driverid' value='<?php echo $this->row_queue->driver_id;?>' maxlength="50" />
            </td>
        </tr>
        <tr><td width='30%'>State:</td><td><?php echo $this->lists['state'];?></td></tr>
        <tr>
            <td></td>
            <td align='center'><b>DETAILS PROVIDED FROM USER</b></td>
        </tr>
        
        <tr><td width='30%'>Name:</td><td><?php echo $this->row_queue->names;?></td></tr>
        <tr><td>email:</td><td><?php echo $this->row_queue->email;?></td></tr>
        <tr><td>Phone:</td><td><?php echo $this->row_queue->phone;?></td></tr>
        <tr><td>Return trip:</td><td><?php echo ($this->row_queue->returntrip?'YES':'NO');?></td></tr>
        <tr><td>Price:</td><td><?php echo $this->row_queue->cprice;?> £</td></tr>
        <tr><td>Infant seats:</td><td><?php echo $this->row_queue->selinfantseats;?></td></tr>
        <tr><td>Child seats:</td><td><?php echo $this->row_queue->selchildseats;?></td></tr>
        <tr><td>Booster seats:</td><td><?php echo $this->row_queue->selboosterseats;?></td></tr>
        <tr><td>PayPal Payment:</td><td><?php echo $this->row_queue->prepay;?> % (<?php echo ($this->row_queue->prepay*$this->row_queue->cprice/100);?> £)</td></tr>
        <tr><td>Vehicle type:</td><td><?php echo booking_helper::getvehicletype($this->row_queue->vehicletype);?></td></tr>
        <tr class='tr_col_from'><td>FROM:</td><td><?php echo $this->row_queue->begin;?></td></tr>
        <?php //if($this->row_queue->from_dest != 1){?>
        <tr class='tr_col_from'><td><?php echo booking_helper::AddressType($this->row_queue->from_dest, 1);?>:</td><td><?php echo $this->row_queue->PickupAddr1;?></td></tr>
        <tr class='tr_col_from'><td><?php echo booking_helper::AddressType($this->row_queue->from_dest, 2);?>:</td><td><?php echo $this->row_queue->PickupAddr2;?></td></tr>
        <tr class='tr_col_from'><td><?php echo booking_helper::AddressType($this->row_queue->from_dest, 3);?>:</td><td><?php echo $this->row_queue->PickupAddr3;?></td></tr>
        <?php //}?>
        <tr class='tr_col_from'>
            <td>Date (d/m/y):</td>
            <td>
                <input class='input1' name='date1' value='<?php echo booking_helper::DateHuman($this->row_queue->datetime1);?>' maxlength=10>
                <input name='time1' class='input2' value='<?php echo booking_helper::TimeHuman($this->row_queue->datetime1);?>' maxlength=5>
            </td>
        </tr>

        <tr class='tr_col_to'><td>TO:</td><td><?php echo $this->row_queue->end;?></td></tr>
        <?php //if($this->row_queue->to_dest != 1){?>
        <tr class='tr_col_to'><td><?php echo booking_helper::AddressType($this->row_queue->to_dest, 1);?>:</td><td><?php echo $this->row_queue->PickupAddr4;?></td></tr>
        <tr class='tr_col_to'><td><?php echo booking_helper::AddressType($this->row_queue->to_dest, 2);?>:</td><td><?php echo $this->row_queue->PickupAddr5;?></td></tr>
        <tr class='tr_col_to'><td><?php echo booking_helper::AddressType($this->row_queue->to_dest, 3);?>:</td><td><?php echo $this->row_queue->PickupAddr6;?></td></tr>
        <?php //}?>
        <?php if($this->row_queue->returntrip){ ?>
            <tr class='tr_col_to'>
                <td>Date for your return trip:</td>
                <td>
                    <input class='input3' name='date2' value='<?php echo booking_helper::DateHuman($this->row_queue->datetime2);?>' maxlength=10>
                    <input name='time2' class='input4' value='<?php echo booking_helper::TimeHuman($this->row_queue->datetime2);?>' maxlength=5>
                </td>
            </tr>
             <?php }else { ?>
            <input name='date2' value='' type='hidden' /><input name='time2' value='' type='hidden' />
            <?php }?>
        <tr><td>Message:</td><td><?php echo $this->row_queue->message;?></td></tr>	
        <tr><td colspan=2 align='center'> --- </td></tr>
        
        <?php if(!empty($this->row_paypal)){ ?>
            
        <tr><td colspan=2 align='center'><b>DETAILS PROVIDED FROM PAYPAL</b></td></tr>
        <tr><td>Payer ID:</td>		<td><?php echo $this->row_paypal->payer_id;?></td></tr>
        <tr><td>Payment date:</td>	<td><?php echo $this->row_paypal->payment_date;?></td></tr>
        <tr><td>First name:</td>	<td><?php echo $this->row_paypal->first_name;?></td></tr>
        <tr><td>Last name:</td>		<td><?php echo $this->row_paypal->last_name;?></td></tr>
        <tr><td>Payer email :</td>	<td><?php echo $this->row_paypal->payer_email;?></td></tr>
        <tr><td>Payer status :</td>	<td><?php echo $this->row_paypal->payer_status;?></td></tr>
        <tr><td>Payment type :</td>	<td><?php echo $this->row_paypal->payment_type;?></td></tr>
        <tr><td>Memo:</td>			<td><?php echo $this->row_paypal->memo;?></td></tr>
        <tr><td>Item name:</td>		<td><?php echo $this->row_paypal->item_name;?></td></tr>
        <tr><td>Quantity:</td>		<td><?php echo $this->row_paypal->quantity;?></td></tr>
        <tr><td>mc gross:</td>		<td><?php echo $this->row_paypal->mc_gross;?></td></tr>
        <tr><td>mc currency:</td>	<td><?php echo $this->row_paypal->mc_currency;?></td></tr>
        <tr><td>Address name:</td>	<td><?php echo $this->row_paypal->address_name;?></td></tr>
        <tr><td>Address street:</td><td><?php echo $this->row_paypal->address_street;?></td></tr>
        <tr><td>Address city:</td>	<td><?php echo $this->row_paypal->address_city;?></td></tr>
        <tr><td>Address state:</td>	<td><?php echo $this->row_paypal->address_state;?></td></tr>
        <tr><td>Address zip:</td>	<td><?php echo $this->row_paypal->address_zip;?></td></tr>
        <tr><td>Address country:</td><td><?php echo $this->row_paypal->address_country;?></td></tr>
        <tr><td>Address status:</td><td><?php echo $this->row_paypal->address_status;?></td></tr>
        <tr><td>Payer business_name:</td><td><?php echo $this->row_paypal->payer_business_name;?></td></tr>
        <tr><td>Payment status:</td><td><?php echo $this->row_paypal->payment_status;?></td></tr>
        <tr><td>Pending reason:</td><td><?php echo $this->row_paypal->pending_reason;?></td></tr>
        <tr><td>Reason code:</td>	<td><?php echo $this->row_paypal->reason_code;?></td></tr>
        <tr><td>txn id:</td>		<td><?php echo $this->row_paypal->txn_id;?></td></tr>
        <tr><td>txn type:</td>		<td><?php echo $this->row_paypal->txn_type;?></td></tr>
        <?php }?>
</table>

<?php echo JHTML::_( 'form.token' ); ?>
    
    <input type="submit" name="submit" value="Save" />
    <input type="button" name="cancel" value="Cancel" onclick="window.history.go(-1);" />
    
<input type="hidden" name="option" value="com_taxibooking" />
<input type="hidden" name="id" value="<?php echo $this->row_queue->id; ?>" />
<input type="hidden" name="controller" value="orders" />
<input type="hidden" name="view" value="order" />
<input type="hidden" name="task" value="save" />
</form>

<?php
//keep session alive while editing
JHTML::_('behavior.keepalive');
?>